<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script>
    for (var i = 1;i <= 5;i++){
        if(i == 3){
            break;
        }
        console.log(i);
    }
</script>
<body>

</body>
</html>